#include "BoundingBox.h"

BoundingBox::BoundingBox(float3 min, float3 max){
	vmin = min;
	vmax = max;
	x_length = vmax.x-vmin.x;
	y_length = vmax.y-vmin.y;
	z_length = vmax.z-vmin.z;
	center.x = (vmin.x+vmax.x)*0.5;
	center.y = (vmin.y+vmax.y)*0.5;
	center.z = (vmin.z+vmax.z)*0.5;
	flag = false;
}

float3 BoundingBox::getMin(){
	return vmin;
}

float3 BoundingBox::getMax(){
	return vmax;
}
float3 BoundingBox::getCenter(){
	return center;
}
bool BoundingBox::getFlag(){
	return flag;
}
void BoundingBox::setFlag(){
	flag = true;
}
float BoundingBox::getxl(){
	return x_length;
}
float BoundingBox::getyl(){
	return y_length;
}
float BoundingBox::getzl(){
	return z_length;
}
